//
//  GoodsDetailSelectSkuShowCell.m
//  ABSallRec
//
//  Created by 我演示 on 2019/11/11.
//  Copyright © 2019 Jerry-Fu. All rights reserved.
//

#import "GoodsDetailSelectSkuShowCell.h"

@interface GoodsDetailSelectSkuShowCell ()
/**label*/
@property(nonatomic,weak) UILabel *showLabel  ;
@end

@implementation GoodsDetailSelectSkuShowCell

-(instancetype)initWithFrame:(CGRect)frame {
    
    if (self = [super initWithFrame: frame]) {
        self.layer.masksToBounds = YES ;
        self.layer.borderWidth = 0.5;
        self.layer.borderColor = [UIColor colorWithHexString:@"#B5B5B5"].CGColor;
        self.layer.cornerRadius = 14.5 ;

        [self makeUpUI];
        [self makeUpSubviews];
    }
    return self;
    
}

-(void)makeUpUI {
    // 顶部选择的view信息
    
    UILabel *label = [[UILabel alloc] initWithTextString:@"xuanz" andTextColor:[UIColor colorWithHexString:@"#333333"] andTextFont:15];
    label.font = [UIFont fontWithName:@"PingFang-SC-Regular" size:13];
    label.textAlignment = NSTextAlignmentCenter ;
    [self addSubview:label];
    self.showLabel = label ;
    
}

-(void)makeUpSubviews {

    [self.showLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.top.right.bottom.equalTo(self).offset(0);
        
    }];
    
}

-(void)setShowModel:(DetailSkuSelectShowModel *)showModel {
    _showModel = showModel ;
    
    self.showLabel.text = showModel.propertyName;
    
    self.backgroundColor = showModel.isSelected ? [UIColor redColor ] : [UIColor whiteColor];
    
    
}

@end
